/*
 * Header file defining the proc_info_struct.
 *
 * Included in the implementation of getprocinfo.
 *
 * Ben Marks, Chris Lekas - CS 45, February 2013
 */

#ifndef __GET_PROC_INFO_H__
#define __GET_PROC_INFO_H__

struct proc_info_struct {
  pid_t pid;                /* pid of process */
  pid_t parn_pid;           /* pid of its parent process */
  pid_t gid;                 /* group id */
  unsigned long user_time;  /* total CPU time in user mode*/
  unsigned long sys_time;   /* total CPU time in system mode*/
  long state;               /* its current state */
  unsigned long long sched_avg_running; /* its scheduled ave running time */
  unsigned int time_slice;   /* its scheduling time slice */
  unsigned int policy;       /* its scheduling policy */
  unsigned long num_cxs;     /* number of context switches it has had  
                                (sum of voluntary and involuntary cxs) */
  int num_children;          /* the number of child processes it has */
  char prog[16];             /* its exec'ed file name (e.g. a.out) */
};

#endif
